//
//  WYPersonHomePageController.m
//  Boss
//
//  Created by admin on 2018/7/4.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "WYPersonHomePageController.h"
#import "WYTableView.h"
#import "WYContainerCell.h"
#import "WYHomePageSectionView.h"
#import "WYHomePageHeaderCell.h"
#import "WYEditHomePageController.h"

#import "WYUserCenterModel.h"
#import "WYUploadModel.h"

#import "UIImage+WYSaveImage.h"

#import "WYIndustryController.h"
#import "WYEnterPriserIntroductionController.h"
#import "WYUserMessage.h"
#import "WYAddProductController.h"
#import "WYSeeProductController.h"
#import "WYProductService.h"
#import "WYMYDynamic.h"
#import "WYRedPacketMessageController.h"
#import "WYShareBottomView.h"
#import "WYMyFollowController.h"
#import "WYDeleteHonorController.h"

#import "CJCompanyMessageCell.h"
#import "WYDynamicCell.h"

#import "CJMYCompanyController.h"

@interface WYPersonHomePageController ()<UITableViewDataSource,UITableViewDelegate,WYContainerCellDelegate,WYHomePageHeaderCellDelegate,UIImagePickerControllerDelegate,UINavigationControllerDelegate>{
    BOOL _isRefresh;
}
@property (nonatomic,strong)WYTableView *tableView;

@property (nonatomic, assign) BOOL canScroll;
@property (nonatomic,strong)WYContainerCell *containerCell;
@property (nonatomic,strong)WYHomePageSectionView *sectionView;
@property (nonatomic,strong)WYUserCenterModel *model;

@property (nonatomic,strong)NSString *pathString;

@property (nonatomic,strong)WYUploadModel *upModel;
@property (nonatomic,strong)WYUserMessage *userMessage;
@property (nonatomic,strong)WYShareBottomView *shareBottomView;
@property (nonatomic,assign)NSUInteger page;
@property (nonatomic,strong)NSMutableArray *dataArray;
@end

@implementation WYPersonHomePageController
-(NSMutableArray *)dataArray
{
    if (!_dataArray) {
        _dataArray = [[NSMutableArray alloc]init];
    }
    return _dataArray;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.page = 1;
    [self setupUI];
    [self loadData];
    [self loadData2];
    [self loadUserData];
    [self loadShare];
    
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(goToC) name:@"WYEnterPriserIntroductionController" object:nil];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(goTo) name:@"WYIndustryController" object:nil];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(gotoService) name:@"addService" object:nil];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(gotoSeeController:) name:@"seeProduct" object:nil];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(gotoRedMessageController:) name:@"myDyc" object:nil];
    [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(gotoDeleteHornor:) name:@"previewHonnor" object:nil];
    
    WEAKSELF
    self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingBlock:^{
        _isRefresh=NO;
        weakSelf.page++;
        // [weakSelf loadTableData];
        [weakSelf loadData];
    }];
    
  //  self.edgesForExtendedLayout = UIRectEdgeNone;
}


-(void)loadData
{
    NSString *page = [NSString stringWithFormat:@"%ld",self.page];
    WEAKSELF
    [WYHttpServer getMyDynamicWithCurrentPage:page WithPageSize:@"15" SucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        
        if (success) {
            if (_isRefresh) {
                [weakSelf.dataArray removeAllObjects];
            }
            
            
            NSArray *array = [WYMYDynamic getDynamicArrayFromJson:response[@"result"][@"detail"]];
            [weakSelf.dataArray addObjectsFromArray:array];
            [weakSelf.tableView reloadData];
            if ([response[@"result"][@"hasNextPage"] integerValue]) {
                [weakSelf.tableView.mj_footer endRefreshing];
            }else{
                [weakSelf.tableView.mj_footer endRefreshingWithNoMoreData];
            }
        }
        
        
        
        
    }];
    
    
    
    
}



-(void)gotoDeleteHornor:(NSNotification *)noc
{
    WYDeleteHonorController *dvc = [[WYDeleteHonorController alloc]init];
    dvc.image = noc.object[@"image"];
    dvc.imageUrl = noc.object[@"url"];
    dvc.dataArray = noc.object[@"dataArray"];
    dvc.indexPath = noc.object[@"indexPath"];
    [self.navigationController pushViewController:dvc animated:YES];
}


-(void)loadShare
{
    WYUserMessage *message = [WYStoreModule currentUserMessage];
    
    
    WEAKSELF
    [WYHttpServer shareToUser:message.id SucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        if (success) {
            [weakSelf.shareBottomView setKLinkURL:response[@"result"]];
            [weakSelf.shareBottomView setKLinkTitle:[NSString stringWithFormat:@"%@的BOSS信息",message.userName]];
            [weakSelf.shareBottomView setKLinkDescription:@"一起来窥探他的个人主页都有什么吧！"];
            [weakSelf.shareBottomView setShareImage:[UIImage imageNamed:@"icon_share_app_lg"]];
        }
        
        
        
    }];
}

-(void)gotoRedMessageController:(NSNotification *)noc
{
    WYMYDynamic *dyc =noc.object[@"service"];
    WYNearRedPacket *redPacket = [[WYNearRedPacket alloc]init];
    redPacket.redpacketId = dyc.packetId;
    redPacket.redpacketType = @"2";
    WYRedPacketMessageController *redVc = [[WYRedPacketMessageController alloc]init];
    redVc.isdymic = YES;
    redVc.packetId = dyc.packetId;
    redVc.messageId = dyc.messageId;
    redVc.redPacket = redPacket;
    
    [self.navigationController pushViewController:redVc animated:YES];
}

-(void)gotoSeeController:(NSNotification *)noc
{
    WYProductService *service = noc.object[@"service"];
    WYSeeProductController *spc = [[WYSeeProductController alloc]init];
    spc.service = service;
    [self.navigationController pushViewController:spc animated:YES];
    
    NSLog(@"%@",noc);
    
    
    
}


-(void)gotoService
{
    WYAddProductController *apc = [[WYAddProductController alloc]init];
    [self.navigationController pushViewController:apc animated:YES];
}
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    
//    if (@available(iOS 11, *)) {
//        UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
//
//    }
    [self loadData];
}
-(void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];
}

-(void)goToC
{
    WYEnterPriserIntroductionController *enc = [[WYEnterPriserIntroductionController alloc]init];
    [self.navigationController pushViewController:enc animated:YES];
}
-(void)goTo
{
    WYIndustryController *enc = [[WYIndustryController alloc]init];
    [self.navigationController pushViewController:enc animated:YES];
}


-(void)loadData2
{
    WEAKSELF
    [WYHttpServer getIntoPersonHomePageSucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        if (success) {
            weakSelf.model = [WYUserCenterModel getUserCenterModelFromJson:response[@"result"]];
            [weakSelf.tableView reloadData];
        }
    }];
}
-(void)loadUserData
{
    
    WEAKSELF
    [WYHttpServer getUserMessageSucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        
        if (success) {
            weakSelf.userMessage = [WYUserMessage getUserMessageFromJson:response[@"result"]];
            [weakSelf.tableView reloadData];
        }
        
    }];
}


-(void)setupUI
{
    [self.view addSubview:self.tableView];
    [self wr_setNavBarShadowImageHidden:YES];
    self.canScroll = YES;
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
    [self.tableView registerClass:[WYContainerCell class] forCellReuseIdentifier:@"WYContainerCell"];
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    [self.tableView registerNib:[UINib nibWithNibName:@"WYHomePageHeaderCell" bundle:nil] forCellReuseIdentifier:@"WYHomePageHeaderCell"];
    self.tableView.tableFooterView = [[UIView alloc]init];
    
    [self.tableView registerNib:[UINib nibWithNibName:@"CJCompanyMessageCell" bundle:nil] forCellReuseIdentifier:@"CJCompanyMessageCell"];
//    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"分享" style:UIBarButtonItemStyleDone target:self action:@selector(shareAction)];
     [self.tableView registerNib:[UINib nibWithNibName:@"WYDynamicCell" bundle:nil] forCellReuseIdentifier:@"WYDynamicCell"];
    
    self.tableView.estimatedRowHeight=100;
    
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"Home_page_share_icon"] style:(UIBarButtonItemStyleDone) target:self action:@selector(shareAction)];
    
    
    
    
    // 设置导航栏颜色
    [self wr_setNavBarBarTintColor:kColorMainColor];
    
    // 设置初始导航栏透明度
    [self wr_setNavBarBackgroundAlpha:0];
    
    // 设置导航栏按钮和标题颜色
    [self wr_setNavBarTintColor:[UIColor whiteColor]];
    [self.view addSubview:self.shareBottomView];
}
-(void)shareAction
{
    self.shareBottomView.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight);
}
#pragma mark - Notification
- (void)changeScrollStatus {
    self.canScroll = YES;
    self.containerCell.objectCanScroll = NO;
}

#pragma mark UIScrollViewDelegate

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    
//    CGPoint offset = scrollView.contentOffset;
//    if (offset.y <= 0) {
//        offset.y = 0;
//    }
//    scrollView.contentOffset = offset;
    
    
    if (scrollView == self.tableView) {
        CGFloat offsetY = scrollView.contentOffset.y;
        if (offsetY > 88) {
            CGFloat alpha = (offsetY - 88) / 88;
            [self wr_setNavBarBackgroundAlpha:alpha];
            [self wr_setNavBarTintColor:[[UIColor whiteColor] colorWithAlphaComponent:alpha]];
            [self wr_setNavBarTitleColor:[[UIColor whiteColor] colorWithAlphaComponent:alpha]];
            [self wr_setStatusBarStyle:UIStatusBarStyleDefault];
            self.title = @"";
        }else{
            [self wr_setNavBarBackgroundAlpha:0];
            [self wr_setNavBarTintColor:[UIColor whiteColor]];
            [self wr_setNavBarTitleColor:[UIColor whiteColor]];
            [self wr_setStatusBarStyle:UIStatusBarStyleLightContent];
            self.title = @"";
            
        }
        
    }
        
        
        
        
        
        
        
//        CGFloat offset = 64;
//        if (kDevice_Is_iPhoneX) {
//            offset = 88;
//        }
//        CGFloat bottomCellOffset = [self.tableView rectForSection:1].origin.y - offset;
//        bottomCellOffset = floorf(bottomCellOffset);
//
//        if (scrollView.contentOffset.y >= bottomCellOffset) {
//            scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
//            if (self.canScroll) {
//                self.canScroll = NO;
//                self.containerCell.objectCanScroll = YES;
//            }
//        }else{
//            //子视图没到顶部
//            if (!self.canScroll) {
//                scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
//            }
//        }
//    }
}

#pragma mark - YHDContainerCellDelegate

//- (void)mmtdOptionalScrollViewDidScroll:(UIScrollView *)scrollView {
//    self.tableView.scrollEnabled = NO;
//}
//
//- (void)mmtdOptionalScrollViewDidEndDecelerating:(UIScrollView *)scrollView {
//    NSUInteger page = scrollView.contentOffset.x/[UIScreen mainScreen].bounds.size.width;
//    [self.sectionView.segmentControl setSelectedSegmentIndex:page animated:YES];
//
//    self.tableView.scrollEnabled = YES;
//}

#pragma mark - UITableViewDelegate && UITableViewDataSource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    WYMyInfo *info = [WYStoreModule currentMyInfo];
    if (info.firmCertificationStatus.integerValue) {
         return 3;
    }else{
         return 2;
    }
    
    
   
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    WYMyInfo *info = [WYStoreModule currentMyInfo];
    if (info.firmCertificationStatus.integerValue) {
       
        if (section == 2) {
            return self.dataArray.count;
        }
        return 1;
        
        
    }else{
        if (section==1) {
            return self.dataArray.count;
        }
        return 1;
    }
    
    
   
}

// 由于Demo中几个cell个数有限且全部不一样，所以这儿不用重用机制
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    if (indexPath.section == 0) {
            WYHomePageHeaderCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WYHomePageHeaderCell" forIndexPath:indexPath];
            
            if (!cell) {
                cell = [[NSBundle mainBundle]loadNibNamed:@"WYHomePageHeaderCell" owner:nil options:nil].firstObject;
            }
            cell.delegate = self;
        if (self.model) {
            [cell setModel:self.model];
        }
        if (self.userMessage) {
            [cell setUserMessage:self.userMessage];
        }
        
        [cell setSelectionStyle:(UITableViewCellSelectionStyleNone)];
        return cell;
    }else{
         WYMyInfo *info = [WYStoreModule currentMyInfo];
        
        if (info.firmCertificationStatus.integerValue) {
            if (indexPath.section==1) {
                CJCompanyMessageCell *cell =[tableView dequeueReusableCellWithIdentifier:@"CJCompanyMessageCell" forIndexPath:indexPath];
                if (!cell) {
                    cell = [[NSBundle mainBundle]loadNibNamed:@"CJCompanyMessageCell" owner:nil options:nil].firstObject;
                }
                if (self.model) {
                    [cell setModel:self.model];
                }
                cell.selectionStyle = UITableViewCellSelectionStyleNone;
                return cell;
            }else{
                WYDynamicCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WYDynamicCell" forIndexPath:indexPath];
                if (!cell) {
                    cell = [[NSBundle mainBundle]loadNibNamed:@"WYDynamicCell" owner:nil options:nil].firstObject;
                }
                cell.delegate = self;
                WYMYDynamic *dyc = self.dataArray[indexPath.row];
                [cell setSelectionStyle:(UITableViewCellSelectionStyleNone)];
                [cell setDyc:dyc];
                
                //cell.selfVc = self.selfVC;
                return cell;
            }
        }else{
            WYDynamicCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WYDynamicCell" forIndexPath:indexPath];
            if (!cell) {
                cell = [[NSBundle mainBundle]loadNibNamed:@"WYDynamicCell" owner:nil options:nil].firstObject;
            }
            cell.delegate = self;
            WYMYDynamic *dyc = self.dataArray[indexPath.row];
            [cell setSelectionStyle:(UITableViewCellSelectionStyleNone)];
            [cell setDyc:dyc];
            
            //cell.selfVc = self.selfVC;
            return cell;
        }
        
       
        
        
        // 重点！横向滑动cell
//        WYContainerCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WYContainerCell" forIndexPath:indexPath];
//        //cell.backgroundColor = [UIColor redColor];
//        if (!cell) {
//            cell =[[WYContainerCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"WYContainerCell"];
//        }
//        cell.selfVc = self;
//        self.containerCell = cell;
//        cell.delegate = self;
//        return cell;
    }
   
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section==1) {
        CJMYCompanyController *mcc = [[CJMYCompanyController alloc]init];
        [self.navigationController pushViewController:mcc animated:YES];
    }
    if (indexPath.section==2) {
        WYMYDynamic *dyc = self.dataArray[indexPath.row];
        WYNearRedPacket *redPacket = [[WYNearRedPacket alloc]init];
        redPacket.redpacketId = dyc.packetId;
        redPacket.redpacketType = @"2";
        WYRedPacketMessageController *redVc = [[WYRedPacketMessageController alloc]init];
        redVc.isdymic = YES;
        redVc.packetId = dyc.packetId;
        redVc.messageId = dyc.messageId;
        redVc.redPacket = redPacket;
        
        [self.navigationController pushViewController:redVc animated:YES];
        
    }
}





-(void)clickDymicAction
{
   // self.sectionView.segmentControl
}
-(void)clickFollowAction
{
    WYMyFollowController *mvc = [[WYMyFollowController alloc]init];
    [self.navigationController pushViewController:mvc animated:YES];
    
    
}
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
//    if (indexPath.section == 0) {
//            return 320;
//    }
//    return self.view.frame.size.height - self.navHeight - 44;
//}

//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
//    return self.sectionView;
//}

//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
//    if (section == 0) {
//        return 0.01f;
//    }
//    return 44.0f;
//}
#pragma mark WYHomePageHeaderCellDelegate
-(void)didSelectEditButton
{
    WYEditHomePageController *hvc = [[WYEditHomePageController alloc]init];
    [self.navigationController pushViewController:hvc animated:YES];
}
-(void)editBackgroundWithImageView:(UIImageView *)imageView
{
    
    WEAKSELF
    UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];
    imagePickerController.delegate = self; //设置代理
    imagePickerController.allowsEditing = YES;
    
    UIAlertController * alertController = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:(UIAlertControllerStyleActionSheet)];
    UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
    }];
    
    UIAlertAction *action2 = [UIAlertAction actionWithTitle:@"拍照" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
        [weakSelf presentViewController:imagePickerController animated:YES completion:nil];
    }];
    
    
    UIAlertAction *action3 = [UIAlertAction actionWithTitle:@"相册" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        if (@available(iOS 11, *)) {
            UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAutomatic;

        }
        imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        [weakSelf presentViewController:imagePickerController animated:YES completion:nil];
    }];
    [alertController addAction:action1];
    [alertController addAction:action2];
    [alertController addAction:action3];
    if (IS_IPAD) {
        UIPopoverPresentationController *popPresenter = [alertController popoverPresentationController];
        popPresenter.sourceView = imageView;
        popPresenter.sourceRect = imageView.bounds;
        [self presentViewController:alertController animated:YES completion:nil];
        
    }else{
        [self presentViewController:alertController animated:YES completion:nil];
    }
    
    
    
    
    
}

-(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
{
    if (@available(iOS 11, *)) {
        UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
    [picker dismissViewControllerAnimated:YES completion:nil];
}
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
{
    if (@available(iOS 11, *)) {
        UIScrollView.appearance.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
    }
    [picker dismissViewControllerAnimated:YES completion:^{}];
    UIImage *photo = [info objectForKey:UIImagePickerControllerOriginalImage];
    NSData * imageDate = UIImageJPEGRepresentation(photo, 0.1);
    UIImage *image = [UIImage imageWithData:imageDate];
    
    NSString *path = [image QCloudTempFilePathWithExtension:@"PNG"];
    self.pathString = path;
    [UIImagePNGRepresentation(image) writeToFile:path atomically:YES];
    
    
    
    //   [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    // [self showLoading:@""];
//    self.productImageView.image = photo;
    WEAKSELF
    [WYHttpServer uploadImageSucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        WYUploadModel *model = [WYUploadModel getupLoadModelFromJson:response[@"result"]];
        [weakSelf upLoadWithPath:model.uploadUrl];
        weakSelf.upModel = model;
        
        
    }];
    
    
    
    
    
    
}
-(void)upLoadWithPath:(NSString *)path
{
    WEAKSELF
    [WYHttpServer PUTWithURLStr:path filePath:self.pathString SucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        if (success) {
            //  [MBProgressHUD hideHUDForView:self.view animated:YES];
            // [self hideLoading];
            //            [weakSelf editHeaderImageview];
            [weakSelf editBack];
        }else{
            
        }
        
    }];
}

-(void)editBack
{
    WEAKSELF
    [WYHttpServer editPersonBackGroundWithBackground:self.upModel.visitUrl SucessBlock:^(BOOL success, id response, NSString *errorMessage) {
        if (success) {
            [weakSelf loadData];
            [[NSNotificationCenter defaultCenter]postNotificationName:@"refreshMessageDate" object:nil];
            
            
        }else{
            
        }
        
        
        
        
    }];
    
}









- (WYTableView *)tableView {
    if (!_tableView) {
        _tableView = [[WYTableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStylePlain];
        _tableView.delegate = self;
        _tableView.dataSource = self;
        [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
    }
    return _tableView;
}
- (WYHomePageSectionView *)sectionView {
    if (!_sectionView) {
        _sectionView = [[WYHomePageSectionView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 44)];
        __weak typeof(self) weakSelf = self;
        [_sectionView.segmentControl setIndexChangeBlock:^(NSInteger index) {
            weakSelf.containerCell.isSelectIndex = YES;
            [weakSelf.containerCell.scrollView setContentOffset:CGPointMake(index*[UIScreen mainScreen].bounds.size.width, 0) animated:YES];
        }];
    }
  //  _sectionView.backgroundColor = [UIColor purpleColor];
    return _sectionView;
}
-(WYShareBottomView *)shareBottomView
{
    if (!_shareBottomView) {
        _shareBottomView = [WYShareBottomView shareedShareBottomView];
        [_shareBottomView setBottomHeightStr:@""];
        _shareBottomView.frame = CGRectMake(0, kScreenHeight, kScreenWidth, kScreenHeight);
    }
    return _shareBottomView;
}
-(void)dealloc
{
    NSLog(@"我的个人主页被销毁了");
    
    
}







@end
